<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Make Timetable</title>
</h:head>
<f:view>
	<h:body>
		<ui:composition template="../includes/template.xhtml">
			<ui:define name="mainbody">
				<p:panel header="Time Table" style="min-height: 550px"
					styleClass="prime_panel">

					<h:form id="form">
						<p:dataTable style="width: 100%" id="slots" var="slot"
							value="#{viewTimetable.timetableModel}" paginator="true"
							rows="10">


							<p:column headerText="Day" filterBy="#{slot.day}"
								style="width:10%">
							
								<h:outputText rendered="#{slot.day eq 1}" value="Monday" />
								<h:outputText rendered="#{slot.day eq 2}" value="Tuesday" />
								<h:outputText rendered="#{slot.day eq 3}" value="Wednesday" />
								<h:outputText rendered="#{slot.day eq 4}" value="Thursday" />
								<h:outputText rendered="#{slot.day eq 5}" value="Friday" />
								<h:outputText rendered="#{slot.day eq 6}" value="Saturday" />
							</p:column>

							<p:column headerText="Class"
								filterBy="#{slot.section.clas.classTitle} #{slot.section.sectionTitle}"
								style="width:20%">
				            #{slot.section.clas.classTitle} #{slot.section.sectionTitle}  
				        </p:column>

							<p:column headerText="By" filterBy="#{slot.teacher.name}"
								style="width:17%">
				            #{slot.teacher.name}  
				        </p:column>

							<p:column headerText="Course" filterBy="#{slot.course.title}"
								style="width:20%">
				            #{slot.course.title}  
				        </p:column>

							<p:column headerText="In" filterBy="#{slot.room.roomTitle}"
								style="width:8%">
				            #{slot.room.roomTitle}  
				        </p:column>

							<p:column headerText="At"
								filterBy="#{slot.startTime} #{slot.endTime}" style="width:25%">
				            #{slot.startTime}-#{slot.endTime}  
				        </p:column>


						</p:dataTable>


					</h:form>

				</p:panel>
			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
